package com.heihei.demo01duck;

import com.heihei.demo01duck.fly.FlyWithWings;
import com.heihei.demo01duck.quack.Quack;

/**
 *  野鸭
 *
 * @version 1.0
 * @since JDK1.8
 * @author duanhengfei
 * @date 2021年02月27日 11:36:57
 */
public class MallardDuck extends Duck {
    public MallardDuck() {
        //野鸭 呱呱叫
        this.quackBehavior = new Quack();
        //野鸭是真的会飞
        this.flyBehavior = new FlyWithWings();
    }

    @Override
    public void display() {
        System.out.println("I'm a real Mallard duck");
    }
}